import request from '@/utils/request'

// 查询包装记录列表
export function packagList(params) {
  return request({
    url: '/erp/packag/list',
    method: 'get',
    params
  })
}

// 修改包装记录
export function packagedit(data) {
  return request({
    url: '/erp/packag',
    method: 'put',
    data
  })
}
// 删除包装记录
export function packagdelete(ids) {
  return request({
    url: '/erp/packag/'+ids,
    method: 'delete'
  })
}
// 获取发货检查详细信息
export function getdeliver(ids) {
  return request({
    url: '/erp/packag/deliver/'+ids,
    method: 'get'
  })
}

// 根据包装列表查询包装记录详情列表
export function detailList(params) {
  return request({
    url: '/erp/packag/detailList',
    method: 'get',
    params
  })
}

export function detailList1(params) {
  return request({
    url: '/erp/packag/detailList1',
    method: 'get',
    params
  })
}




// 修改包装列表查询包装记录
export function detailsEdit(data) {
  return request({
    url: '/erp/packag/detailsEdit',
    method: 'put',
    data
  })
}

// 批量核验确认
export function detailsEdits(data) {
  return request({
    url: '/erp/packag/detailsEdits',
    method: 'put',
    data
  })
}

// 送产品id生成包装数据
export function generatePackage(data) {
  return request({
    url: '/erp/packag/generatePackage',
    method: 'post',
    data
  })
}


// 设置发货检查
export function installDeliver(data) {
  return request({
    url: '/erp/packag/installDeliver',
    method: 'post',
    data
  })
}

//查询可以包装的产品列表
export function repairProductList(params) {
  return request({
    url: '/erp/packag/repairProductList',
    method: 'get',
    params
  })
}

//查询工人列表
export function workerList() {
  return request({
    url: '/erp/packag/workerList',
    method: 'get',
  })
}

//查询用户列表
export function userDown() {
  return request({
    url: '/erp/selectDown/userDown?deptId=116',
    method: 'get',
  })
}


// 获取包装记录详细信息
export function getpackag(id) {
  return request({
    url: '/erp/packag/'+id,
    method: 'get'
  })
}




// 查询发货列表
export function deliverList(params) {
  return request({
    url: '/erp/deliver/list',
    method: 'get',
    params
  })
}
// 查询包装记录列表
export function deliverList1(params) {
  return request({
    url: '/erp/deliver/list1',
    method: 'get',
    params
  })
}

// 新增发货
export function generateDeliver(data) {
  return request({
    url: '/erp/deliver/generateDeliver',
    method: 'post',
    data
  })
}

// 获取发货信息详情
export function detailIds(id) {
  return request({
    url: '/erp/deliver/'+id,
    method: 'get'
  })
}

//设置发货检查
export function deliverinstallDeliver(data) {
  return request({
    url: '/erp/deliver/installDeliver',
    method: 'post',
    data
  })
}

// 删除发货


export function deliverdelete(id) {
  return request({
    url: '/erp/deliver/'+id,
    method: 'delete'
  })
}

export function workerAccomplish(id) {
  return request({
    url: '/erp/packag/workerAccomplish/'+id,
    method: 'post'
  })
}

export function auditAccomplish(id) {
  return request({
    url: '/erp/packag/auditAccomplish/'+id,
    method: 'post'
  })
}






